package me.security.base;

import java.util.HashMap;
import java.util.Map;

public class Data {
	public static Map<String, String> usernameAndPassword;
	public static Map<String, String[]> accountAndRole;
	public static Map<String, String[]> roleAndAuthority;
	
	
	public Data init(){
		
		usernameAndPassword = new HashMap<String, String>();
		usernameAndPassword.put("Lucas", "123456");
		usernameAndPassword.put("Dell", "123456");
		usernameAndPassword.put("Mecury", "123456");
		
		accountAndRole = new HashMap<String, String[]>();
		accountAndRole.put("Lucas", new String [] {"ADMIN", "USER", "ROLE"});
		accountAndRole.put("Dell", new String [] {"USER"});
		accountAndRole.put("Mecury", new String [] {"ROLE"});
		
		
		roleAndAuthority = new HashMap<String, String[]>();
		roleAndAuthority.put("ADMIN", new String[]{"ADMIN1, ADMIN2, ADMIN3"});
		roleAndAuthority.put("USER", new String[]{"USER1, USER2, USER3"});
		roleAndAuthority.put("ROLE", new String[]{"ROLE1, ROLE2, ROLE3"});
		
		return this;
	}
	
}
